package com.okq.entity;

import com.okq.entity.base.DataEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * 描述 : 审批表实体类
 * 作者 : zdl
 * 日期 : 2017/6/30 9:40
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "tb_approval")
public class Approval extends DataEntity implements Serializable {
    private static final long serialVersionUID = 5232045235543343845L;

    /**
     * 审批类型 1：生产 2：入库 3：出库 4：质检
     */
    @Column(name = "type")
    private Integer type;
    /**
     * 相关Id(包含所有申请审核的Id)
     */
    @Column(name = "relevantId", length = 40)
    private String relevantId;
    /**
     * 申请人Id
     */
    @Column(name = "applyId", length = 40)
    private String applyId;
    /**
     * 申请人
     */
    @Column(name = "applyName", length = 10)
    private String applyName;
    /**
     * 申请时间
     */
    @Column(name = "applyTime")
    private String applyTime;
    /**
     * 内容
     */
    @Column(name = "content")
    private String content;
    /**
     * 审批人Id
     */
    @Column(name = "approvalId", length = 40)
    private String approvalId;
    /**
     * 审批人姓名
     */
    @Column(name = "approvalName", length = 10)
    private String approvalName;
    /**
     * 审批时间
     */
    @Column(name = "approvalTime")
    private String approvalTime;
    /**
     * 审批状态 0：未审批 1：已审批
     */
    @Column(name = "state")
    private Integer state;
    /**
     * 审批结果 0：不同意 1：同意
     */
    @Column(name = "result")
    private Integer result;
    /**
     * 不批准原因
     */
    @Column(name = "reason")
    private String reason;

    /* ---------------- 查询条件 ---------------- */
    /**
     * 开始时间
     */
    @Transient
    private String startTime;
    /**
     * 结束时间
     */
    @Transient
    private String endTime;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getRelevantId() {
        return relevantId;
    }

    public void setRelevantId(String relevantId) {
        this.relevantId = relevantId;
    }

    public String getApplyId() {
        return applyId;
    }

    public void setApplyId(String applyId) {
        this.applyId = applyId;
    }

    public String getApplyName() {
        return applyName;
    }

    public void setApplyName(String applyName) {
        this.applyName = applyName;
    }

    public String getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(String applyTime) {
        this.applyTime = applyTime;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getApprovalId() {
        return approvalId;
    }

    public void setApprovalId(String approvalId) {
        this.approvalId = approvalId;
    }

    public String getApprovalName() {
        return approvalName;
    }

    public void setApprovalName(String approvalName) {
        this.approvalName = approvalName;
    }

    public String getApprovalTime() {
        return approvalTime;
    }

    public void setApprovalTime(String approvalTime) {
        this.approvalTime = approvalTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
}
